package com.example.demo.mapper;


import com.example.demo.entity.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
    @Insert("insert into user(id,appid,username,passwd,createtime)values(#(id),#(appid),#(username),#(passwd),#(createtime))")
    public int insertUser(User user);
    @Select("select id,appid,username,passwd,createtime from l1 where username=#{username}")
    public List<User> getAll(String username);
    @Delete("delete from l1 where id={id};")
    public int delete(int id);
    @Update("update l1 set username=#{username} where id =#{id}")
    public int update(int id,String username);

}
